tried to do as much processing as possible up front, before the conditionals. the idea was that it would save cost on glyphs, but it still managed to turn into a mess in the bottom right.